﻿using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Console.Model
{
    public class StudentMap : EntityTypeConfiguration<Student>
    {
        public StudentMap()
        {
            ToTable("MY_Student");

            HasKey(d => d.StuId);


            HasRequired(p => p.IDCard).WithRequiredPrincipal(p => p.Student);
            HasOptional(p => p.IDCard).WithRequired(p => p.Student);


        }
    }
}
